home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 41 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: lyra.csx.cam.ac.uk!nmm1
  2. From: nmm1@cus.cam.ac.uk (Nick Maclaren)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Undefined result vs. int's holding undefined values.
  5. Date: 6 Jan 1996 16:42:29 GMT
  6. Organization: University of Cambridge, England
  7. Message-ID: <4cm8pl$sdg@lyra.csx.cam.ac.uk>
  8. References: <4ck70b$rd7@news.informix.com>
  9. NNTP-Posting-Host: bootes.cus.cam.ac.uk
  10.  
  11. People have correctly pointed out that "undefined behaviour" allows
  12. the program to execute the "halt and catch fire" instruction, declare
  13. Armageddon, or anything else.
  14.  
  15. But your other meaning "return an undefined value" also exists in the
  16. standard, as does "return a valid but undefined value" (which is not
  17. the same), and "return an undefined member of a set of defined values".
  18. If I remember correctly, I found at least two and possibly three other
  19. possibilities when I studied this area.
  20.  
  21. However, these extra categories are rarely (if ever) CALLED "undefined"
  22. in the standard.  The standard uses the term "undefined" in a specific
  23. way, and uses other phraseologies to describe the other possibilities.
  24. If you find an exception to this, it is probably an error in the
  25. wording of the standard.
  26.  
  27.  
  28. Nick Maclaren,
  29. University of Cambridge Computer Laboratory,
  30. New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
  31. Email:  nmm1@cam.ac.uk
  32. Tel.:  +44 1223 334761    Fax:  +44 1223 334679
  33.